package com.lpz.service.impl;

import com.lpz.dao.IAccounDao;
import com.lpz.dao.IAccunDaoimpl;
import com.lpz.factory.BeanFactory;
import com.lpz.service.IAccountService;

/**
 * 账户业务层的实现类
 */
public class AccountServiceImple implements IAccountService {
    //private IAccounDao accountDao =new IAccunDaoimpl();
    //去掉new关键字之后利用工厂模式进行解耦，去调用dao层。用工厂的getbean方法，给传参为properties定义的内容
    private IAccounDao accountDao= (IAccounDao)BeanFactory.getBean("accountDao");
    public void saveAccount() {
        accountDao.savesccount();
    }
}
